//
// Created by xili on 2024/8/3 16:36.
// Go big or go home.
//
#include <iostream>
#include <vector>
#include <unordered_set>

using namespace std;

class Solution {
public:
    string destCity(vector<vector<string>> &paths) {
        unordered_set<string> usa;
        for (auto &item: paths) {
            usa.insert(item[0]);
        }
        for (auto &item: paths) {
            if (!usa.count(item[1])) {
                return item[1];
            }
        }
        return "";
    }
};